//
//  StatusbarPlugin.swift
//  MyApp
//
//  Created by 猛猛 on 2021/7/16.
//

import Foundation
@objc(StatusbarPlugin) class StatusbarPlugin: CDVPlugin {
    @objc func getHeight(_ command:CDVInvokedUrlCommand){
        let height = UIApplication.shared.statusBarFrame.height
        let result = CDVPluginResult(status: .ok, messageAs: "\(height)")
        result?.setKeepCallbackAs(true)
        self.commandDelegate.send(result, callbackId: command.callbackId)
        return
    }
}
